<?php echo $this->fetch('header.html'); ?>
<div class="row">
<div class="span12">
<?php echo $this->fetch('attr/nav.html'); ?>
<form method="get" action="<?php echo $this->_var['appadmin']; ?>" class="form form-inline">
<input type="hidden" name="m" value="attribute" />

属性分类：<select name="cat_id">
<option value="0">请选择</option>
<?php $_from = $this->_var['attr_cat']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
<option value="<?php echo $this->_var['k']; ?>" <?php if ($this->_var['k'] == $_GET['cat_id']): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['c']; ?></option>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
<input type="submit" value="搜索" class="btn btn-success" />
</form>

<form method="post" action="<?php echo $this->_var['appadmin']; ?>?m=attribute&a=order">
 <table class='table table-bordered' width='100%'>
  <tr>
   <td>id</td>
   <td>属性名称</td>
   <td>属性分类</td>
    
   <td>属性类型</td>
   <td>表字段</td>
   <td>排序</td>
    
   <td>输入方式</td>
<td>操作</td>
  </tr>
 <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
   <td><?php echo $this->_var['c']['id']; ?></td>
   <td><?php echo $this->_var['c']['title']; ?></td>
   <td><?php echo $this->_var['attr_cat'][$this->_var['c']['cat_id']]; ?></td>
    
   <td><?php echo $this->_var['attr_type_list'][$this->_var['c']['attr_type']]; ?></td>
   <td><?php if ($this->_var['c']['col_name']): ?><?php echo $this->_var['c']['col_name']; ?><?php else: ?>非字段<?php endif; ?></td>
   <td><input type="text" name="orderindex[<?php echo $this->_var['c']['id']; ?>]" value="<?php echo $this->_var['c']['orderindex']; ?>"  class="w50" /></td>
    
   <td><?php echo $this->_var['input_type_list'][$this->_var['c']['input_type']]; ?></td>
<td>[<a href="<?php echo $this->_var['appadmin']; ?>?m=attribute&a=add&id=<?php echo $this->_var['c']['id']; ?>&cat_id=<?php echo intval($_GET['cat_id']); ?>">编辑</a>] 
[<a href="javascript:;" class="delete" url="<?php echo $this->_var['appadmin']; ?>?m=attribute&a=delete&id=<?php echo $this->_var['c']['id']; ?>">删除</a>]</td>
  </tr>
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 </table>
 <input type="submit" value="更改排序"  class="btn btn-success"/>
 </form>
<div><?php echo $this->_var['pagelist']; ?></div>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>